﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ORS.OrderRobot.EFCore.Migrations
{
    /// <inheritdoc />
    public partial class _621 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "MointerProductEnable",
                table: "SystemConfigs");

            migrationBuilder.DropColumn(
                name: "RefreshTokenEnable",
                table: "SystemConfigs");

            migrationBuilder.DropColumn(
                name: "CustomerId",
                table: "Accounts");

            migrationBuilder.DropColumn(
                name: "CustomerNo",
                table: "Accounts");

            migrationBuilder.RenameColumn(
                name: "RefreshToeknCron",
                table: "SystemConfigs",
                newName: "RefreshTokenTaskJson");

            migrationBuilder.RenameColumn(
                name: "MointerProductCron",
                table: "SystemConfigs",
                newName: "MointerProductTaskJson");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "RefreshTokenTaskJson",
                table: "SystemConfigs",
                newName: "RefreshToeknCron");

            migrationBuilder.RenameColumn(
                name: "MointerProductTaskJson",
                table: "SystemConfigs",
                newName: "MointerProductCron");

            migrationBuilder.AddColumn<bool>(
                name: "MointerProductEnable",
                table: "SystemConfigs",
                type: "tinyint(1)",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<bool>(
                name: "RefreshTokenEnable",
                table: "SystemConfigs",
                type: "tinyint(1)",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<string>(
                name: "CustomerId",
                table: "Accounts",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "CustomerNo",
                table: "Accounts",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
